package com.googlecode.gwt.commons.logging.gwtshell;

import org.apache.commons.logging.impl.AbstractLogger;


public class GWTShellLogger extends AbstractLogger {

	private static final long serialVersionUID = 1L;
	
	public GWTShellLogger() {
		super();
	}

	public GWTShellLogger(String name) {
		this.loggerName = name;
	}

	public void init(String name) {
		this.loggerName = name;
	}
	
	public void debug(Object message) {
		debug(message, null);
	}

	public void debug(Object message, Throwable t) {
		gwtShellLog("DEBUG", message, t);
	}

	public void error(Object message) {
		error(message, null);
	}

	public void error(Object message, Throwable t) {
		gwtShellLog("ERROR", message, t);
	}

	public void fatal(Object message) {
		fatal(message, null);
	}

	public void fatal(Object message, Throwable t) {
		gwtShellLog("FATAL", message, t);
		
	}

	public void info(Object message) {
		info(message, null);
	}

	public void info(Object message, Throwable t) {
		gwtShellLog("INFO", message, t);
	}

	public void trace(Object message) {
		trace(message, null);
	}

	public void trace(Object message, Throwable t) {
		gwtShellLog("TRACE", message, t);
	}

	public void warn(Object message) {
		warn(message, null);
	}

	public void warn(Object message, Throwable t) {
		gwtShellLog("WARN", message, t);
	}
	
	public boolean isDebugEnabled() {
		return true;
	}

	public boolean isErrorEnabled() {
		return true;
	}

	public boolean isFatalEnabled() {
		return true;
	}

	public boolean isInfoEnabled() {
		return true;
	}

	public boolean isTraceEnabled() {
		return true;
	}

	public boolean isWarnEnabled() {
		return true;
	}
	
}
